import { userPostJson } from '@/api/apiTool'

//登录
export function userLogin(data, success, showMsg = false) {
    let url = "/front/User/login"
    userPostJson(url, data, success, showMsg)
}

//检查token
export function checkUserToken(data, success, showMsg = false) {
    let url = "/front/Base/checkToken"
    userPostJson(url, data, success, showMsg)
}

//获取注册验证码
export function getUserRegisterEmailCaptcha(data, success, showMsg = false) {
    let url = "/front/User/getRegisterEmailCaptcha"
    userPostJson(url, data, success, showMsg)
}

//注册
export function userRegist(data, success, showMsg = false) {
    let url = "/front/User/regist"
    userPostJson(url, data, success, showMsg)
}

//获取用户信息
export function getUserMsg(data, success, showMsg = false) {
    let url = "/front/User/getUserMsg"
    userPostJson(url, data, success, showMsg)
}

//获取找回密码验证码
export function getFindPasswordEmailCaptcha(data, success, showMsg = false) {
    let url = "/front/User/getFindPasswordEmailCaptcha"
    userPostJson(url, data, success, showMsg)
}

//重设密码
export function resetUserPassword(data, success, showMsg = false) {
    let url = "/front/User/resetUserPassword"
    userPostJson(url, data, success, showMsg)
}

//修改个人信息
export function resetUserMsg(data, success, showMsg = false) {
    let url = "/front/User/resetUserMsg"
    userPostJson(url, data, success, showMsg)
}

//修改密码
export function updatePassword(data, success, showMsg = false) {
    let url = "/front/User/updatePassword"
    userPostJson(url, data, success, showMsg)
}